package com.haoze.nurse.schedule;

import com.haoze.nurse.dao.PatChaperonageMapper;
import org.bouncycastle.crypto.agreement.jpake.JPAKEPrimeOrderGroup;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@ConditionalOnProperty(prefix = "scheduledtask", name = "open", havingValue = "true")
public class CleanChapSchedule {

    @Resource
    PatChaperonageMapper patChaperonageMapper;

    @Scheduled(cron = "59 59 23 * * ?")
    public void cleanChapSchedule() {
        // 清除已经出院患者陪护证
        patChaperonageMapper.delChapOutpat();
    }

}
